Skip to content

Adds Tech Lab Agentic Audiences#14626

Open
therevoltingx wants to merge 11 commits intoprebid:masterfrom
InteractiveAdvertisingBureau:feature/adds-agentic-audiences
Open

Adds Tech Lab Agentic Audiences#14626
therevoltingx wants to merge 11 commits intoprebid:masterfrom
InteractiveAdvertisingBureau:feature/adds-agentic-audiences

Conversation

@therevoltingx
Copy link
Copy Markdown
Contributor

@therevoltingx therevoltingx commented Mar 22, 2026

Add Agentic Audience Adapter RTD Module

Description

This PR adds a new RTD (Real-Time Data) provider module that injects Agentic Audiences (vector-based) signals into the OpenRTB bid request. Output follows the OpenRTB community extension Agentic Audiences in OpenRTB. Background: IABTechLab Agentic Audiences.

The module reads agentic audience data from browser storage (localStorage or cookie) and injects it into user.data with standard Segment objects (id, name, ext).

Features

  • Multi-provider support, no per-provider Prebid modules: Configure any number of vendors under params.providers. Each key (e.g. liveramp, raptive, or a label for a partner not represented by its own Prebid module) becomes user.data[].name for that provider’s segments. No extra Prebid.js modules per provider—only this RTD submodule, plus a storageKey per entry. Future or custom providers work whenever their script stores the Storage Format blob at that key.
  • Configuration: If params.providers is missing, empty, or not an object, init returns false and no data is injected.
  • OpenRTB-aligned segments: Each stored entry is copied into Segment with Agentic Audiences fields in ext (ver, vector, dimension, model, type); the module does not validate or normalize those values
  • Base64 storage: Wrapper JSON in cookie/localStorage is read via atob + JSON.parse as in Storage Format

Configuration

pbjs.setConfig({
  realTimeData: {
    auctionDelay: 300,
    dataProviders: [{
      name: 'agenticAudience',
      waitForIt: true,
      params: {
        providers: {
          liveramp: { storageKey: '_lr_agentic_audiences_' },
          raptive: { storageKey: '_raptive_agentic_audiences_' }
        }
      }
    }]
  }
});

Module params (this submodule)

These are the fields under realTimeData.dataProviders[].params when name is agenticAudience. Other dataProvider options (e.g. waitForIt) are generic RTD behavior, not read by this module.

Parameter Type Description
providers Object Map from provider label to per-provider settings. The label becomes OpenRTB user.data[].name. If providers is missing, not an object, or has no own keys, init returns false and no segments are injected.

Each value in providers is an object. Only the following property is read:

Parameter Type Description
storageKey string Storage key passed to localStorage and, if unset there, the cookie API. If missing or falsy, that provider entry is skipped (no user.data row for it).

Provider keys are arbitrary strings chosen by the publisher (or convention with a data partner). There is no whitelist in the module: a key for a future vendor is valid as long as you point storageKey at where that partner’s script stores data, using the same JSON shape as in Storage Format.

Storage Format

The outer stored value is base64-encoded JSON with an entries array. Each entry maps to one OpenRTB Segment. Description column text is from the OpenRTB community extension Agentic Audiences in OpenRTB (Data.segment and Segment.ext).

Field Type Description
id string ID of the data segment (standard Segment field).
name string Descriptive name for the segment (standard Segment field).
ver string Specification version for embedding schema compatibility (e.g., "1.0.0").
vector string Base64-encoded embedding. The binary payload is Float32 values packed as IEEE 754 binary32 in little-endian byte order (4 bytes per value), concatenated, then standard Base64 (RFC 4648).
dimension number Number of Float32 values in the embedding. Must equal (Base64-decoded byte length) / 4. The decoded byte length must be divisible by 4. This field allows a DSP (or other consumer) to perform rapid validation—for example, by comparing dimension to an expected length for a given model before or without fully decoding the vector.
model string Model identifier that produced the embedding (e.g., "sbert-mini-ctx-001").
type number array Embedding type(s): 1 = identity, 2 = contextual, 3 = reinforcement. An entry may encode multiple signal types.

OpenRTB Output

Per Agentic Audiences in OpenRTB, the module appends one Data object under user.data for each configured provider that has at least one mappable segment after reading storage.

Single provider

Each Data object’s name is the provider key from params.providers (e.g. liveramp). segment is built from that provider’s stored entries array.

{
  "user": {
    "data": [
      {
        "name": "liveramp",
        "segment": [
          {
            "id": "agentic-audiences",
            "ext": {
              "ver": "1.0.0",
              "vector": "<Base64 Float32 little-endian per spec>",
              "dimension": 3,
              "model": "sbert-mini-ctx-001",
              "type": [1, 2]
            }
          }
        ]
      }
    ]
  }
}

Multiple providers

With several providers (e.g. liveramp and raptive), each reads its own storageKey; user.data contains one element per provider that returned segments, in iteration order of Object.keys(params.providers) (insertion order for ordinary objects).

{
  "user": {
    "data": [
      {
        "name": "liveramp",
        "segment": [
          {
            "id": "agentic-audiences",
            "ext": {
              "ver": "1.0.0",
              "vector": "<Base64 from liveramp storage>",
              "dimension": 384,
              "model": "sbert-mini-ctx-001",
              "type": [1]
            }
          }
        ]
      },
      {
        "name": "raptive",
        "segment": [
          {
            "id": "agentic-audiences",
            "ext": {
              "ver": "1.0.0",
              "vector": "<Base64 from raptive storage>",
              "dimension": 256,
              "model": "raptive-embed-v1",
              "type": [2]
            }
          }
        ]
      }
    ]
  }
}

The sample id values above mirror a typical stored entry; segment id and name are copied from storage as provided (the examples omit name on the segment only for brevity).

The vector in each ext is whatever string was stored per entry (OpenRTB Base64 Float32 LE per spec); this module does not encode or decode it.

Files Changed

  • modules/agenticAudienceAdapter.js - RTD submodule implementation
  • test/spec/modules/agenticAudienceAdapter_spec.js - Unit tests

Build

gulp build --modules="rtdModule,agenticAudienceAdapter,..."

Testing

npm test -- --file "test/spec/modules/agenticAudienceAdapter_spec.js"

References

@github-actions
Copy link
Copy Markdown

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

Tread carefully! This PR adds 1 linter warning (possibly disabled through directives):

  • modules/agenticAudienceAdapter.js (+1 warning)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01b523c7e3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

getBidRequestData
};

submodule(REAL_TIME_MODULE, agenticAudienceAdapterSubmodule);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Register the new RTD submodule in .submodules.json

If a publisher builds with --modules=agenticAudienceAdapter and relies on the normal parent-module auto-inclusion, this submodule will never run because gulpHelpers.getArgModules() only prepends rtdModule for names listed in modules/.submodules.json (gulpHelpers.js:61-68), and agenticAudienceAdapter is not added there. The bundle will compile, but the RTD hook is missing at runtime, so the adapter silently does nothing.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added the module to modules/.submodules.json

Comment on lines +142 to +145
export const agenticAudienceAdapterSubmodule = {
name: MODULE_NAME,
init,
getBidRequestData
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Declare a GVL ID for GDPR-enforced deployments

On sites that enable consentManagementTcf with tcfControl, this submodule is treated as an unknown vendor because the registration object never sets gvlid. attachRealTimeDataProvider() only records submodule.gvlid (modules/rtdModule/index.js:198-200), and tcfControl resolves that ID before allowing storage access and UFPD enrichment (modules/tcfControl.js:110-138, 245-257). In that setup, the localStorage/cookie read and the user.data update are both blocked unless the publisher adds a manual gvlMapping, so the module effectively does nothing on GDPR traffic.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added VENDORLESS_GVLID

## References

- [IABTechLab Agentic Audiences](https://github.com/IABTechLab/agentic-audiences)
- [Agentic Audiences in OpenRTB](https://github.com/IABTechLab/agentic-audiences) (Segment extension proposal)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not appear to be the correct reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the correct place is actually

InteractiveAdvertisingBureau/openrtb#210

@patmmccann patmmccann changed the title Agentic Audiences: Adds New Module for Agentic Audiences by Tech Lab Agentic Audiences rtd: initial commit Mar 22, 2026
"model": "sbert-mini-ctx-001",
"dimension": 3,
"type": [1, 2]
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const REAL_TIME_MODULE = 'realTimeData';
const MODULE_NAME = 'agenticAudience';

export const DEFAULT_PROVIDERS = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove references to specific vendors in the code and just move this into the documentation so the publisher chooses it with config


This RTD module injects Agentic Audiences (vector-based) signals into the OpenRTB bid request. Agentic Audiences is an open standard by [IABTechLab](https://github.com/IABTechLab/agentic-audiences) for exchanging semantic embeddings—identity, contextual, and reinforcement signals—in a privacy-preserving, interoperable format.

The module reads agentic audience data from browser storage (localStorage or cookie) and adds it to `user.data` as segment extensions for downstream bidders.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally feels unnecessary, is this intended as an example? Liveramp and optable are both rather capable of maintaining their own modules. This would allow them to communicate with their endpoints rather than relying on data being in storage, which seems like a bad place for it given the alternatives

user: {
data: [
{
name: 'live_ramp',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you breaking up liveramps name

data: [
{
name: 'live_ramp',
segment: [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again this looks rather incomplete and is not in the segment object spec

gulp build --modules="rtdModule,agenticAudienceAdapter,..."
```

> Note that the global RTD module, `rtdModule`, is a prerequisite.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to commit to submodules.json in that case

name: 'agenticAudience',
waitForIt: true,
params: {
providers: {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please define types for this entire interface

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi i added a proper type table below. let me know if that's what you meant

| dimension | number | Vector dimension |
| type | number[] | Embedding type(s): identity, contextual, reinforcement |

These fields align with the [Agentic Audiences OpenRTB Segment extension](https://github.com/IABTechLab/agentic-audiences).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extension does not appear to be at this link and youre not using extension fields

@patmmccann patmmccann self-assigned this Mar 22, 2026
@patmmccann
Copy link
Copy Markdown
Collaborator

Generally what's your goal here? Optable and liveramp both already have modules they could pr to inject their embeddings. It's unclear what utility this has

@github-actions
Copy link
Copy Markdown

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

@therevoltingx therevoltingx marked this pull request as draft March 22, 2026 01:06
@therevoltingx
Copy link
Copy Markdown
Contributor Author

@patmmccann thanks for the review comments. just realized that i actually have to get this: InteractiveAdvertisingBureau/openrtb#210 merged before even tackling this.

let me get that PR merged first before circling back to this PR. i will also ask liveramp and internally if we can just ask vendors to update their own prebid modules.

@patmmccann
Copy link
Copy Markdown
Collaborator

@patmmccann thanks for the review comments. just realized that i actually have to get this: InteractiveAdvertisingBureau/openrtb#210 merged before even tackling this.

let me get that PR merged first before circling back to this PR. i will also ask liveramp and internally if we can just ask vendors to update their own prebid modules.

Great! We're really looking forward to transacting on this, thanks for pushing it forward

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

@therevoltingx therevoltingx force-pushed the feature/adds-agentic-audiences branch from fae6daf to 21ebd4d Compare April 6, 2026 19:10
@therevoltingx therevoltingx marked this pull request as ready for review April 6, 2026 19:12
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Report for PR #14626

Coverage increased (+0.002%) to 96.344%

Diff Coverage: 219 of 222 changed lines covered (98.65%)

Uncovered Changes

File Covered Changed %
modules/agenticAudienceAdapter.js 44 47 93.62%

Coverage Regressions

3 previously-covered lines in 2 files lost coverage.

File Lines Lost Coverage
modules/browsiAnalyticsAdapter.js 1 92.31%
modules/widespaceBidAdapter.js 2 83.67%

Coverage Status
Change from base Build 23950616689: 0.002%
Covered Lines: 216935
Relevant Lines: 225168

💛 - Coveralls

@therevoltingx
Copy link
Copy Markdown
Contributor Author

@patmmccann
ok we are now ready to resume attempting to release this module.

we discussed with liveramp and internally and the main idea here is to have one universal module for agentic audiences. this is the same approach we took for PAIR btw.

but basically providers don't have to go through the whole PR->merge process and simply document their configuration for this module.

hope that explanation makes sense and let me know if i missed anything with the PR.
i also added a PR for its documentation here: prebid/prebid.github.io#6518

@therevoltingx therevoltingx changed the title Agentic Audiences rtd: initial commit Adds Tech Lab Agentic Audiences Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants